package com.zxp00.JavaBasics;

import static com.zxp00.JavaBasics.Z01_base.printSign;

public class Z02_Loop {
    public static void loop_for(){
        /*for循环，可以使用fori回车快捷键*/
        for(int i=0;i<3;i++){
            System.out.println("Hello World");
        }
    }

    /*while循环*/
    public static void loop_while(){
        int j=0;
        while (j<3){
            System.out.println("Hello World");
            j++;
        }
    }

    /*do-while循环*/
    public static void loop_do_while(){
        int x=0;
        do {
            System.out.println("Hello World");
            x++;
        }while (x<3);
    }




    public static void main(String[] args) {
        loop_for();
        printSign();
        System.out.println();
        loop_while();
        printSign();
        System.out.println();
        loop_do_while();
    }
}
